package com.eksboot;

public class Java {

    public static String getCurrentMethodName() {
        int level = 1;
        StackTraceElement[] stacks = new Throwable().getStackTrace();
        String methodName = stacks[level].getMethodName();
        return methodName;
    }

    public static String getCurrentClassName() {
        int level = 1;
        StackTraceElement[] stacks = new Throwable().getStackTrace();
        String className = stacks[level].getClassName();
        return className;
    }

    public static int getLineNumber() {
        int level = 1;
        StackTraceElement[] stacks = new Throwable().getStackTrace();
        int lineNumber = stacks[level].getLineNumber();
        return lineNumber;
    }

    public static void main(String[] args) {


        int lineNumber = getLineNumber();


        System.out.println(lineNumber);
    }
}
